<?php
echo form_open_multipart('employee/add_employee/');
if ($this->session->userdata('add_erro')) {
	echo $this->session->userdata('add_erro');
	$this->session->unset_userdata('add_erro');
}
?>
<div id="request-style-boder"> 
	<div id="request-style">
		<div class="request-style">
			<strong class="form-request-heading">ADD NEW EMPLOYEE</strong>
			<hr style="margin-top:10px; height:2px;" />
			<table>
				<tbody>
					<tr>
						<td class="txt">Staff ID<span class="star">*</span></td>
						<td class="txt1">:</td>
						<td class="input_txt">
							<?php echo form_input(array('name' => 'txt_id', 'value' => set_value('txt_id'), 'placeholder' => 'Example: STAFF_001', 'class' => 'span3')) . form_error('txt_id', '<span class="req-error">', '</span>'); ?>
						</td>
					</tr>
					<tr>
						<td class="txt">First Name<span class="star">*</span></td>
						<td class="txt1">:</td>
						<td class="input_txt"><?php echo form_input(array('name' => 'txt_fname', 'value' => set_value('txt_fname'), 'class' => 'span3')) . form_error('txt_fname', '<span class="req-error">', '</span>'); ?></td>
					</tr>
					<tr>
						<td class="txt">Last Name<span class="star">*</span></td>
						<td class="txt1">:</td>
						<td><?php echo form_input(array('name' => 'txt_lname', 'value' => set_value('txt_lname'), 'class' => 'span3')) . form_error('txt_lname', '<span class="req-error"', '</span>'); ?></td>
					</tr>
					<tr>
						<td class="txt">Gender<span class="star">*</span></td>
						<td class="txt1">:</td>
						<td class="input_txt"><?php echo form_dropdown('txt_gender', $option_gender, set_value('txt_gender'), 'class="span3"'); ?></td>
					</tr>
					<tr>
						<td class="txt">Picture</td>
						<td class="txt1">:</td>
						<td class="input_txt"><?php echo form_upload(array('name' => 'txt_photo', 'value' => set_value('txt_photo'), 'class="span3"')); ?></td>
					</tr>
					<tr>
						<td class="txt">Start Work Date</td>
						<td class="txt1">:</td>
						<td class="input_txt">
							<?php
							echo form_input('txt_start_workdate', set_value('txt_start_workdate'), 'id="workingon" class="span3"') . form_error('txt_start_workdate', '<span class="req-error">', '</span>');
							?>
							<input type="hidden" name="working_on" id="working_on_alternate" />
						</td>
					</tr>
					<tr>
						<td class="txt">Position<span class="star">*</span></td>
						<td class="txt1">:</td>
						<td class="input_txt"><?php echo form_dropdown('txt_position', $option_pos, set_value('txt_position'), 'class="span3"'); ?></td>
					</tr>
					<tr>
						<td class="txt">Role<span class="star">*</span></td>
						<td class="txt1">:</td>
						<td class="input_txt"><?php
							echo form_dropdown('txt_role', $option_role, set_value('txt_role'), 'class="span3"');
							?></td>
					</tr>
					<tr>
						<td class="txt">Status</td>
						<td class="txt1">:</td>
						<td class="input_txt"><?php echo form_dropdown('txt_status', $option_status, set_value('txt_status'), 'class="span3"'); ?></td>
					</tr>
					<tr>
						<td class="txt">Department<span class="star">*</span></td>
						<td class="txt1">:</td>
						<td class="input_txt"><?php echo form_dropdown('txt_dept', $option_dept, set_value('txt_dept'), 'class="span3" id="dept_id" onchange="getValue(this)"'); ?></td>
					</tr>
					<tr>
						<td class="txt">Sub Department<span class="star">*</span></td>
						<td class="txt1">:</td>
						<td class="input_txt"><?php echo form_dropdown('txt_sub_dept', $option_sub_dept, set_value('txt_sub_dept'), 'class="span3" id="mysub_id" disabled'); ?></td>
					</tr>
<!--					<tr>
						<td class="txt">Group<span class="star">*</span></td>
						<td class="txt1">:</td>
						<td class="input_txt"><?php // echo form_dropdown('txt_group', $option_grp, set_value('txt_group'), 'class="span3"'); ?></td>
					</tr>-->
					<tr>
						<td colspan="2"></td>
						<td>
							<?php
							$submit = array('name' => 'btn_add_employee', 'value' => 'Add New');
							echo anchor('employee/show_employee', form_button('btn_Cancel', 'Cancel', 'class="btn btn-info"'), 'style="text-decoration:none;"') . nbs(2) . form_submit($submit, '', ' class="btn btn-info" ');
							?>
						</td>
					</tr>
				</tbody>
			</table> 
			<?php echo form_close(); ?>
		</div>
	</div>
</div>